import RoleAPI from "@/api/system/role";

const avueOptions = {
  size: "large",
  labelWidth: 100,
  submitBtn: true,
  emptyBtn: true,
  column: [
    {
      label: "角色名称",
      prop: "title",
      rules: [{ required: true, message: "请输入角色名称", trigger: "blur" }],
    },
    {
      label: "角色描述",
      prop: "description",
      rules: [{ required: true, message: "请输入描述", trigger: "blur" }],
    },

    {
      label: "权限列表",
      prop: "rules",
      type: "cascader",
      multiple: true,
      dicData: RoleAPI.getRulesOptions,
      rules: [{ required: true, message: "请配置权限", trigger: "blur" }],
    },

    {
      label: "超级管理员",
      prop: "is_boss",
      type: "switch",
      dicData: [
        { label: "否", value: 0 },
        { label: "是", value: 1 },
      ],
    },

    {
      label: "状态",
      prop: "status",
      type: "switch",
      dicData: [
        { label: "禁用", value: 0 },
        { label: "启用", value: 1 },
      ],
    },
  ],
};

export default avueOptions;
